package com.daoyintech.utils;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by xuzhaolin on 15/12/28.
 */
public class WebUtils {
    public static final String pattern_yyyyMMdd = "yyyyMMdd";





    public static String getTodayDate(){
        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
        return sdf.format(new Date());
    }

    public static long getCurrentSeconds() {
        long currentMilSeconds = System.currentTimeMillis();
        return currentMilSeconds/1000;
    }

    public static long getDateSeconds()  {
        SimpleDateFormat df = new SimpleDateFormat("yyyy/MM/dd");
        String dateString = "2016/2/10";
        Date date = null;
        try {
            date = df.parse(dateString);
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return date.getTime()/1000;

    }

}
